const selectMap = {
    //单位名称
    entId: {
        url: "/api/buenterprise/queryAll",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.id,
                    label: item.entFullname,
                    selectLabel: item.entFullname
                };
            })
        }
    },
    //业务员
    salesId: {
        url: "/api/user/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.id,
                    label: item.username,
                    selectLabel: item.username,
                };
            })
        }
    },
    //币种
    currency: {
        url: "/api/base/currency/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.currencyCode,
                    label: `${item.currencyCode}|${item.currencyName}`,
                    selectLabel: `${item.currencyCode}|${item.currencyName}`,
                };
            })
        }
    },
    //费用类型
    feeName: {
        url: "/api/base/feetype/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    label: item.feeName,
                    value: item.feeName,
                    selectLabel: item.feeName,
                };
            })
        }
    },
    //目的港
    portDestinationId: {
        url: "/api/base/port/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.id,
                    label: `${item.portName} | ${item.portEnName}`,
                    selectLabel: `${item.portName} | ${item.portEnName}`,
                };
            })
        }
    },
    //操作员
    operaterId: {
        url: "/api/user/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.id,
                    label: item.username,
                    selectLabel: item.username,
                };
            })
        }
    },
    //船名
    vessel:{
        url: "/api/base/voyage/query",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.veseel,
                    label: item.veseel,
                    selectLabel: item.veseel,
                    voyage: item.voyage,
                };
            })
        }
    },
    //订舱名称
    bookingAgentId:{
        url: "/api/buenterprise/dropdown",
        returnQueryParam: (t: string) => {
            return {
                PageIndex: 1,
                PageSize: 20,
                KeyWords: t,
                Type:"订舱单位"
            }
        },
        returnOption: (data: any) => {
            return data.map((item: any) => {
                return {
                    id: item.id,
                    value: item.entFullname,
                    label: item.entFullname,
                    selectLabel: item.entFullname
                };
            })
        }
    },

}
export default selectMap;